﻿Imports System.ComponentModel.DataAnnotations

Public Class PatientGeneralExmination
    Public Property examID() As Short
    <Required()> _
    Public Overloads Property patientId() As Long
    <Required()> _
    Public Property examDate() As Date
    <Required()> _
    Public Property examByDr() As Integer
    Public Property pulse() As System.Nullable(Of Single)
    Public Property temperature() As System.Nullable(Of Single)
    Public Property respiration() As System.Nullable(Of Single)
    Public Property bpup() As System.Nullable(Of Single)
    Public Property bpdown() As System.Nullable(Of Single)
    Public Property heartRate() As System.Nullable(Of Single)
    Public Property height() As System.Nullable(Of Double)
    Public Property weight() As System.Nullable(Of Double)
    Public Property headcircumference() As System.Nullable(Of Double)
    <Required()> _
    Public Property healthStatus() As Integer
    Public Property notes() As String
#Region "NHibernate Composite Key Requirements"
    Public Overrides Function Equals(ByVal obj As Object) As Boolean
        If obj Is Nothing Then Return False
        Dim t = TryCast(obj, PatientGeneralExmination)
        If t Is Nothing Then Return False
        If patientId = t.patientId AndAlso examID = t.examID Then
            Return True
        End If

        Return False
    End Function
    Public Overrides Function GetHashCode() As Integer
        Dim hash As Integer = 13
        hash += patientId.GetHashCode()
        hash += examID.GetHashCode()

        Return hash
    End Function
#End Region
End Class
